﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="CRM.Web.CustomerManage.List" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title></title>
    <link href="<%= base.ResourcesPath + "Style/main.css" %>" rel="stylesheet" type="text/css" />
    <link href="<%= base.ResourcesPath + "Style/button.css" %>" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/jquery-1.6.2.min.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/My97DatePicker/WdatePicker.js"  defer="defer" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/MaskTextBox.js" ></script>
    <script type="text/javascript" src="<%= base.ResourcesPath %>Js/button.js"></script>
</head>
<body >
    <form id="form1" runat="server" DefaultButton="btnSearch">
        <table border="0" cellpadding="0" cellspacing="0" id="tTitle">
            <tr>
                <td class="left">
                    <img src="<%= base.ResourcesPath %>Images/title_left.gif" alt="" />
                </td>
                <td class="middle" >
                    <div class="pagetitle" >
                        <div>
                            <asp:Label ID="lblTitle" runat="server" Text="客户信息列表"></asp:Label>
                        </div>
                    </div>
                </td>
                <td class="right">
                    <img src="<%= base.ResourcesPath %>Images/title_right.gif" alt="" />
                </td>
            </tr>
        </table> 
    
    <div id="divMain" >
    <div style="width: 100%" id="tBodyMain">
        <div class="listdiv">
            <table border="0" cellpadding="0" cellspacing="0" class="search" align="center">
                <tr>
                    <td class="title">
                        <div class="nowrap">
                            客户姓名:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtCUSTOMERNAME" runat="server" CssClass="txt" MaxLength="32" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            号码:</div>
                    </td>
                    <td class="content">
                        <asp:TextBox ID="txtMOBILEPHONE" runat="server" CssClass="txt" MaxLength="20" Rows="3"
                            TextMode="SingleLine"></asp:TextBox>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            客户群:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlCUSTOMERBASE" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            客户类型:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlCUSTOMERTYPE" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="title">
                        <div class="nowrap">
                            客户等级:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlCUSTOMERLEVEL" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                    </td>
                    <td class="title">
                        <div class="nowrap">
                            特殊类型:</div>
                    </td>
                    <td class="content">
                        <asp:DropDownList ID="ddlSPECIALTYPE" runat="server" CssClass="ddl">
                        </asp:DropDownList>
                    </td>
                    <td class="title">
                        <div  class="nowrap">
                            客户日期:</div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">
                            <asp:TextBox ID="txtBECOMEDATEBegin" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox>-<asp:TextBox
                                ID="txtBECOMEDATEEnd" runat="server" MaxLength="20" CssClass="datetime"></asp:TextBox></div>
                    </td>
                    <td class="title">
                        <div  class="nowrap">
                            创建人:</div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">
                            <asp:TextBox ID="txtCREATEPEOPLE" runat="server" MaxLength="64" CssClass="txt"></asp:TextBox></div>
                    </td>
                </tr>
                <tr> 
                    <td class="title">
                        <div  class="nowrap">
                            导出记录:</div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">                            
                            <asp:TextBox ID="txtRecordBegin" runat="server" MaxLength="20" CssClass="small"></asp:TextBox>-<asp:TextBox
                                ID="txtRecordEnd" runat="server" MaxLength="20" CssClass="small"></asp:TextBox>（条）
                        </div>
                    </td>
                    <td class="title">
                        <div  class="nowrap">
                            单次导出数:</div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">    
                            <asp:Label ID="lblExportMaxRows" runat="server" ></asp:Label>                        
                        </div>
                    </td>
                    <td class="title">
                        <div  class="nowrap">
                            </div>
                    </td>
                    <td class="content">
                        <div style="white-space: nowrap;">                            
                        </div>
                    </td>
                    <td class="title">
                        &nbsp;
                    </td>
                    <td class="content">
                        <div style="width: 200px;" class="nowrap">
                            <asp:Button ID="btnSearch" runat="server" Text="查 询" CommandName="Search" CssClass="btn title_cx"
                                OnClick="btnSearch_Click" />
                            <asp:Button ID="btnExportExcel" runat="server" Text="导 出" CommandName="Export" CssClass="btn title_cx"
                                OnClick="btnExportExcel_Click" />
                        </div>
                    </td>
                </tr>
            </table>
            <dp:WebGridView ID="gvList" runat="server" CssClass="gridview" 
                AutoGenerateColumns="False" OnRowCreated="gvList_RowCreated" 
                OnRowDataBound="gvList_RowDataBound" OnRowDeleting="gvList_RowDeleting" AllowPaging="True" 
                AllowSorting="True" SortExpressionValue="CUSTOMERID"  
                SortDirectionValue="DESC" >
                <Columns>
			    <asp:BoundField DataField="CUSTOMERID" HeaderText="客户编号"  SortExpression="CUSTOMERID"  Visible="false" />
			        <asp:TemplateField HeaderText="客户代码" SortExpression="CUSTOMERCODE">
                        <ItemTemplate>
                            <asp:HyperLink id="hlModifyCUSTOMERCODE" runat="server" NavigateUrl='<%# Eval("CUSTOMERID", ModifyUrl) %>' Text='<%# Bind("CUSTOMERCODE") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="客户姓名" SortExpression="CUSTOMERNAME">
                        <ItemTemplate>
                            <asp:HyperLink id="hlModifyCUSTOMERNAME" runat="server" NavigateUrl='<%# Eval("CUSTOMERID", ModifyUrl) %>'  Text='<%# Bind("CUSTOMERNAME") %>'></asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField>
			    <asp:BoundField DataField="FIRSTCONTACTTEL" HeaderText="首选联系号码"  
                        SortExpression="FIRSTCONTACTTEL"  />
			    <asp:BoundField DataField="MOBILEPHONE" HeaderText="手机号码"  SortExpression="MOBILEPHONE" />
			    <asp:BoundField DataField="HOMEPHONE" HeaderText="座机号码"  SortExpression="HOMEPHONE" />
			    <asp:BoundField DataField="ADDRESS" HeaderText="详细地址"  SortExpression="ADDRESS" Visible="false" />
			    <asp:BoundField DataField="COUNTRY" HeaderText="国家"  SortExpression="COUNTRY" Visible="false"/>
			    <asp:BoundField DataField="PROVINCE" HeaderText="省份"  SortExpression="PROVINCE" Visible="false"/>
			    <asp:BoundField DataField="PREFECTURECITY" HeaderText="地级市"  SortExpression="PREFECTURECITY" Visible="false"  />
			    <asp:BoundField DataField="CITY" HeaderText="区/县/市"  SortExpression="CITY" Visible="false" />
			    <asp:BoundField DataField="VILLAGETOWN" HeaderText="乡/镇/街道"  SortExpression="VILLAGETOWN" Visible="false"/>
			    <asp:BoundField DataField="VILLAGE" HeaderText="村"  SortExpression="VILLAGE" Visible="false"/>
			    <asp:BoundField DataField="GROUPTEAM" HeaderText="组/队"  SortExpression="GROUPTEAM" Visible="false"/>
			    <asp:BoundField DataField="CUSTOMERBASE" HeaderText="客户群"  SortExpression="CUSTOMERBASE"  Visible="false" />
			    <asp:BoundField DataField="CUSTOMERTYPE" HeaderText="客户类型"  SortExpression="CUSTOMERTYPE"  Visible="false" />
			    <asp:BoundField DataField="CUSTOMERLEVEL" HeaderText="客户等级"  SortExpression="CUSTOMERLEVEL" Visible="false"/>
			    <asp:BoundField DataField="SPECIALTYPE" HeaderText="特殊类型"  SortExpression="SPECIALTYPE" Visible="false" />
			    <asp:BoundField DataField="BIGCUSTOMERTYPE" HeaderText="大客户类型"  SortExpression="BIGCUSTOMERTYPE" Visible="false"/>
			    <asp:BoundField DataField="STATUS" HeaderText="状态"  SortExpression="STATUS" Visible="false" />
			    <asp:BoundField DataField="IDNUMBER" HeaderText="证件号码"  SortExpression="IDNUMBER"  Visible="false" />
			    <asp:BoundField DataField="EMAIL" HeaderText="邮件地址"  SortExpression="EMAIL" Visible="false" />
			    <asp:BoundField DataField="ZIPCODE" HeaderText="邮编"  SortExpression="ZIPCODE" Visible="false"/>
			    <asp:BoundField DataField="FAX" HeaderText="传真"  SortExpression="FAX" Visible="false"/>
			    <asp:BoundField DataField="CREATETIME" HeaderText="创建时间"  SortExpression="CREATETIME" Visible="false"/>
			    <asp:BoundField DataField="CREATEPEOPLEID" HeaderText="创建人编号"  SortExpression="CREATEPEOPLEID" Visible="false"/>
			    <asp:BoundField DataField="CREATEPEOPLE" HeaderText="创建人"  SortExpression="CREATEPEOPLE" Visible="false"/>
			    <asp:BoundField DataField="LASTMODIFYPEOPLEID" HeaderText="最后修改人编号"  SortExpression="LASTMODIFYPEOPLEID" Visible="false"/>
			    <asp:BoundField DataField="LASTMODIFYPEOPLE" HeaderText="最后修改人"  SortExpression="LASTMODIFYPEOPLE" Visible="false"/>
			    <asp:BoundField DataField="LASTMODIFYTIME" HeaderText="最后修改时间"  SortExpression="LASTMODIFYTIME" Visible="false"/>
			    <asp:BoundField DataField="REMARK" HeaderText="备注"  SortExpression="REMARK" Visible="false"/>
			    <asp:BoundField DataField="STATUSLOG" HeaderText="记录状态变更日志"  SortExpression="STATUSLOG" Visible="false"/>
			    <asp:BoundField DataField="FTIMESTAMP" HeaderText="时间戳"  SortExpression="FTIMESTAMP" Visible="false"/>
			    <asp:BoundField DataField="AGE" HeaderText="年龄"  SortExpression="AGE" Visible="false"/>
			    <asp:BoundField DataField="ISACCEPTSMS" HeaderText="接受短信"  SortExpression="ISACCEPTSMS" Visible="false"/>
			    <asp:BoundField DataField="ISACCEPTINFORMATION" HeaderText="接受资料"  SortExpression="ISACCEPTINFORMATION" Visible="false"/>
			    <asp:BoundField DataField="BIRTHDATE" HeaderText="生日"  SortExpression="BIRTHDATE" Visible="false"/>
			    <asp:BoundField DataField="DEALERID" HeaderText="经销商编号"  SortExpression="DEALERID" Visible="false"/>
			    <asp:BoundField DataField="DEALERNAME" HeaderText="经销商名称"  SortExpression="DEALERNAME" Visible="false"/>
			    <asp:BoundField DataField="DEALERCODE" HeaderText="经销商代码"  SortExpression="DEALERCODE" Visible="false"/>
			    <asp:BoundField DataField="ORGNAME" HeaderText="组织名称"  SortExpression="ORGNAME" Visible="false"/>
			    <asp:BoundField DataField="ZONENAME" HeaderText="区域名称"  SortExpression="ZONENAME" Visible="false"/>
			    <asp:TemplateField HeaderText="操作" ShowHeader="False">
                    <itemtemplate>
                    <div style="white-space: nowrap;">
                    <asp:HyperLink id="hlModify" runat="server" NavigateUrl='<%# Eval("CUSTOMERID", ModifyUrl) %>'>详细</asp:HyperLink>
                    <asp:LinkButton id="lbtnDelete" runat="server" Text="删除" CommandName="Delete" CausesValidation="False" OnClientClick="return confirm('您确认要删除此条记录吗？');"></asp:LinkButton>            
                    </div>
				    </itemtemplate>
                </asp:TemplateField>
                </Columns>	
                <RowStyle CssClass="row" />
                <AlternatingRowStyle CssClass="row2" />
                <HeaderStyle CssClass="header" />	
                <PagerStyle CssClass="pager" />	
            </dp:WebGridView>
        </div>
    </div>  
    </div>  
    </form>
</body>
</html>
